import pytest
import time





def run(keys):
    """启动pytest"""
    local_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())
    pytest.main(["-m", keys,
                 r"--html=test_report/test{}.html".format(local_time),
                 "--self-contained-html",
                 "--capture=sys"])

if __name__ == '__main__':
    run("debug")